/*
 * @Author: xiaosihan 
 * @Date: 2024-01-20 08:03:29 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-01-20 16:04:39
 */
import { cloneDeep } from "lodash";
import { WindowData } from "../type";
import window1GLB from "./window1.glb?url";
import window2GLB from "./window2.glb?url";
import utils from "@utils";

class Config {
    constructor() {
    }

    // 窗型配置
    windowType = [
        { name: "C0813L", url: window1GLB, color: "#FE0032" },
        { name: "C0613L", url: window2GLB, color: "#FFFF00" },
    ]

    // 安装状态配置
    installState = [
        { key: "kuang", installState: "框安装", installColor: "#FF6666" },
        { key: "siafeng", installState: "塞缝处理", installColor: "#4ab2ff" },
        { key: "shan", installState: "扇/五金", installColor: "#FFFF99" },
        { key: "boli", installState: "玻璃", installColor: "#CCFFFF" },
        { key: "mifj", installState: "密封胶", installColor: "#CCFF99" },
    ]

    // 创建窗户数据,并且安装状态随机
    randWindowData(windowType: number = 0): WindowData {
        return {
            ...cloneDeep(this.windowType[windowType]),
            ...utils.randItem(this.installState)
        }
    }

}

const config = new Config();

export default config;